package com.hospital.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
//普通挂号表
@Data
public class Register {
    @NotNull(message = "id不得为空")
    private int register_id;

    @NotNull(message = "patient_id不得为空")
    private int patient_id;

    @NotNull(message = "employee_id不得为空")
    private int employee_id;

    @NotNull(message = "office_id不得为空")
    private int office_id;

    @NotNull(message = "register_type不得为空")
    private int register_type;

    @NotNull(message = "register_price不得为空")
    private double register_price;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "挂号时间不得为空")
    private Date register_time;
}
